(Non-Compound) FileType Key

Used by GetClassFile2XAODC to match patterns against various file bytes in a non-compound file.

Registry Entry

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
    \FileType
        \<
CLSID>
           
\<n> = <offset, cb, mask, value>

Value Entries

<offset, cb, mask, value>

Offset and cb are limited to 16 bits. Offset is from the beginning or end of the file, with a negative value for offset being interpreted from the end of the file; cb is a the length in bytes. Together, these values represent a particular byte range in the file. mask is a bit mask used to perform a logical AND operation, using the byte range spedified by offsert and cb. The result of the AND operation is compared with If mask is omitted, it is assumed to all ones. offset and cb are decimal unless preceded by "0x". mask and pattern are always hex.

 

Remarks

Entries under the FileType key are used by the GetClassFile2XAODC function to match patterns against various file bytes in a non-compound file. FileType has CLSID subkeys, each of which has a series of subkeys \0, \1, \2, ... These values contain a pattern that, if matched, should yield the indicated CLSID. See also the GetClassFile function.

Following are examples of FileType entries.
        \0 = 0, 4, FFFFFFFF, ABCD1234
where the first 4 bytes must be ABCD12 34, in that order, or
        \1 = 0, 4, FFFFFFFF, 9876543
where they must match 9876543, or .
        \2 = -4, 4, FEFEFEFE
where  the last four bytes in the file must be FEFEFEFE.

See Also

GetClassFile, File Extension